Skip to content

perf(native): offload workspace scans and media reads - #71

Merged
aamott merged 2 commits into
mainfrom
perf/native-read-workers-primary
Oct 17, 2026
Merged

aamott merged 2 commits into
mainfrom
perf/native-read-workers-primary

Conversation

@aamott

@aamott aamott commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Changes

  • Revalidate the blocking-I/O audit: sync_now is gone and network rounds/imports already use background threads.
  • Move open_workspace, list_workspace_entries, and read_media_file onto Tauri blocking workers with owned inputs and path validation inside the worker.
  • Preserve traversal/prefix/hidden-file behavior, media caps and raw IPC bytes, and existing domain errors. Log and return typed native.worker_failed on worker join failure.
  • Add deterministic scheduling, independent-worker, dropped-future, changed-filesystem, async-signature, and raw-response regression tests.
  • Guard renderer workspace results with an open generation as well as the root path, preventing stale opens/errors/refreshes from winning after A -> B -> A or a same-path reopen. Four regression cases fail before the guard and pass after it.

Scope and follow-up

This is the first read-only slice of async_io_commands; the plan remains in progress. Search/index commands must be handled together with synchronous rename/delete callers so moving one writer does not leave the main thread waiting on the same SQLite mutex. History/mutation/dialog work stays separate.

Based on main at 054406b. The renderer lifecycle guard touches useWorkspaceSession, which is not touched by the still-open native-boundary stack (#70); no overlapping edits. No sync algorithm, dependency, or release changes.

Verification

  • pnpm qa passed for the native worker slice (lint, Knip, typecheck, TypeScript suites, Rust format/tests).
  • Focused workspace/media/session/window-lifecycle Rust tests pass; final 10 blocking-command tests and cargo fmt check pass.
  • Final lifecycle guard: all 11 useWorkspaceSession tests, changed-file ESLint, and desktop typecheck pass. Commit hooks pass.
  • No live native window or emulator test, and no measured speedup claim. Existing dev app was stopped with permission; user files are preserved separately.

@aamott
aamott merged commit f6fd2f3 into main Oct 17, 2026
13 checks passed
@aamott
aamott deleted the perf/native-read-workers-primary branch October 17, 2026 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant